#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
int main() {
	int r, c, i, j;
	printf("please enter the number of the rows:\t");
	scanf("%d", &r);
	printf("please enter the number of the cols:\t");
	scanf("%d", &c);
	int** y= (int **)malloc(r*sizeof(int*));
	for (i = 0; i < r; i++)
		y[i] = (int*)malloc(c * sizeof(int));
	for (i = 0; i < r; i++)
		for (j = 0; j < c; j++)
			y[i][j] = i + j;
	free(y);
	return 0;
}